'use strict';
require('./index.css');

var _mm = require('util/mm.js');
var _admin = require('service/admin-service.js');

var page = {
    init: function() {
        this.onLoad();
        this.bindEvent();
    },
    onLoad: function() {
        $(".curr").click();
    },
    bindEvent: function() {

        var formData = {
                tuser: $.trim($('#username').val()),
                tpassword: $.trim($('#password').val())
            },

        var _this = this;

         $(document).on('click', '.submit', function(){
            _admin.login(formData, function(res){
                alert("success!");

            }, function(errMsg){
                alert("error!");
            });
        });
     }


};
$(function() {
    page.init();
})